Added pages functionality