adding chapter2 exercise