some refactoring (created util package)
some more refactoring