make endpoint a field in client, so it can injected