adding dynamic navigation and smooth scrolling