created factory, injected a service