modified client to accept responses with data from before processing for connections,

and added tests for the changes