improve set iterator a bit