cleaned up each loop into a one liner for 5th excercise