added conditions for nav menu