(Hopefully) Solution to Programming Assigment 2