added goto -> std::transform