modified some navigation code that produced awkward formatting