added fuction for small screen navigation