update and support pagination