some more work on the message handler