smarter way for navbar