Part B of Assignment 1