moved functions from clean... to utility