Assignment 5.1 first solution

seems a little forced with the for loops: going to make another pass