working client server with tests