adding pagination to collection pages and removing default core pagination middleware