script now iterates over all objects in collection