I wonder if this file should live in src/util and not core?