This is code from following along in Cousera courses