add factory of pagination