Work done on part 2 of assignment 1