move functions to util section