jac444 assignment 1 q2 all methods done