fixed merging messages
improved merge model