update A1P1  (assgn 1 part 1)