moved util funcs to util folder