adds logic for mobile header