now working. trying to parallelize as much as possible.
i think i parallelize it as much as possible and seems working properly.