refactoring -- added utils class for testing