Finished HW1 for CS311