returning id as a string, not an integer
refactored with enumerable#lazy, threading.. hope it works!