added generic pagescontroller