Implementation of Prototype design pattern