replaced factory with static method