client.cpp more almost completed