updated each loops