done with copy
done with search. Not the same as in c++.com but works