Final submission for programming assignment 2