add pages controller and some testing