replaced each with until