update nav bar with more conditions