separated out input pre-processing from mode-specific control processing