integrate logic with UI for both types of play page.