replace all msg to vars
delete output msgs
update tests