Adjusted user func to include pagination.