finalised client, now integration tests