refactor pagination to make it more safe(define refreshContent() in crecords)