added interface for client API, to help with testing, mocking