Programming assignment 2 (Week 3)