Complete programming assignment 2