make navigator as a global varibale