move int value iterator into a class instead of dynamic object with closures (~2.8x faster)