added basic sidebar handling