added the functionality to navigation