This is the homework 9 for CSCI 571