more sidebar logic for mobile