refactoring, adding core