CSC161 Supplemental Problem 5 code