replace deprecated api, pane switch support