Move function to AssociativeEngine.Utils