added pages
added callback functionality