Added examples for chapters 5 and 8