Working on exercise 4 also adjusted formatting for consistency