Updated code to update navigation