saving for in loop work before switching to regular loop