Add functions to UtilityFunctions.m