remove some n+1 queries