some refactoring
added utils