Remove for loop in resolver