work in progress: reading messages from server