fixed up sidebar refactoring