Add handleWait function to visualizationView