continuing core refactor