initial revision: utility function