added 'each' method