Updated 4.1 with better answer
Another implementation of 4.2
Added some folders