implemented Factory Method pattern