modify array.each to support increase sequance iteration