improved message processing