refactored system