added functionality for the main pages of the website