Assignment 2 for COMP9417