problem 7, unhappy with execution time