move util function.