move utils to utils libs  & func move to templatefunc