Is this loop necessary? If it is empty then it should ignore the for each loop and send the same response at the end.