Adding various chapter3 examples