changed .factory to .provider for creating a service