for the coursera assignment