Adding functionality to show pages