reduce dependancy with factory trait