Solution for problem 28 :)