CMPUT 279 assignment 2