fixed all n+1 queries