refactor and add $eagerLoads array