Problem 4 - Solved + tests