Implemented examples in first chapter