code and figures for course project 1