re-create each do method

using a custom iterator