switching the endpoint to localhost