finished all but the last problem in COMP301 hw