avoid clone-ing and to_owned-ing