Make the utility function more streamlined.