modify calculation of pane num
prepare for GitHub