update coursera assignment 3