added density calculation

nav-bar now also works