changing APIService to endpointService