Final version of Assign 1