some changes to pagination