constructor of client correctly called