refactor return calc