client modified for tests