improving pagination