Initial attempt at completing programming assignment 2.