Finished the homework for Chapter1..