Final code

CMPS242 UCSC project code