interface with client, not tested.