dynamically changes the sidebar