pulled in util from another proj, untested, cleanup later