make panes work with any number of panes! probably!