add my solution to exercise 5