Implemented  Factory Method pattern