Programming assignment 2