refactoring, added utils