implementing the service functions