refactor message return