updated pages controller