improvements in navigation code