updated message processing