fixed to work better with in_threads — do not use each through Enumerable