Improves problem 7