Added pagination on threads