refactored out references to activeInput