Solved problem 212 (improvable execution time..)