move utilfunction to util.