This is the homework 2.