Coursera Programming Assignment 2 correction