Code for the Coursera class