core refactoring...