Complete Programming assignment 2