refactored core model