set general function paginator