implement message reading