using switchDisp function defined the website.