navigation code updated for better readability