homework 2 for CMPS121