Exercise 5-7
(without double for loop, YAY!)