split out utils from core