Part of the discussion https://scratch.mit.edu/discuss/topic/453262/
I probably made it too complicated but it works and its easy to use