made navbar more dynamic