refactored control architecture