added support for running initialization function on pane select