Code example of pool object design pattern

Initial code