moved "endpoint" parameter in call method