move dual pane into its own function and add unit tests