pages functionality