add functionality for toggling sidebar