My version of COSC310 assignment 3