change the display logic for the two pages
working prototype for the front end