small simplification of navigation code