sidebar refactoring