Adding sort and pagination parts