parallel implementation in TBB