following along with https://class.coursera.org/compinvesting1-002/