Chapter1 examples implemented