refactoring, added utility class