add replace for loop for each with asynch fn