my solution to 7