updated method used to determine pane name (it was incorrect on the code example in the forums)