CPSC501 Assignment 4