move util functions