added test for function clientExists