added better functionality to navigation menu