reading messages in client