Finished Homework23 for CMSC-16100