refactor message attribute