Example for Factory Method pattern