Homework #5 for CSC496