use switchDisp func defined on the website