params wern't being passed from the factory function