use find_each to reduce memory usage