refactored sidebar