plots and code for assignment 1