refactored sidepanel