added my solution to problem 7