adding chapter3, exercise 1.