initializeModeVariables