refactored state/controller relationship