refactored messages, more strict rules for message conversion