this is very useful. I have written the same for liquid layer as well like 2 years ago :D (never released it, as I found an issue with how liquid works while coding the tool)