Solution for level 4
Level 5 solution