First implementation of Programming Assignment 2