some std::transform calls have been replaced by std::for_each

it's a bit shorter