CMPS121 homework 2