move some util functions into separate module