Implemented Factory Method pattern