Added pagination to frontend