added functionality to main page