n+1 queres fix