unified message handling