use switchDisp function defined on the website.