add promise return to factory