Added eample codes for chapter5