Programming assignment 2 - submitted version