add history to switch click