moved the cout message so that you only see it when the server has a reply.