Solved problem 5, Allen