Found this in my old projects, don't know why I didn't share it. Might use it for smth
I'm sure this is not an original idea, so I'm not taking credit for it