More efficient parallel implementation