pages functionality added