Chapter 01 code done, to be verified