refactoring: moved useful methods to utils class