problem 50 - almost
problem50