a decent solution to panel switching, need to abstract, but good for now