add page functionality