add pagination method