removing unnecessary blank lines
fixing sorting paginated list