use find_each and transaction