adding nav logic