coursera assignment 2 code changes