shifting util functions around a bit