started refactoring core util