modified simple_client