fully working part 1 of estimation, basically changed list comprehension with iteration (yields) to reduce memory overhead