removes N+1 query