Add the main page functionality for HW 5