use std::copy instead of std::transform.