add pagination to prevent hanging