add utils package
some refactors