got rid of N+1 queries