added nav logic