coding the mobile menu function