modified to open pages inside right pane
merging