Copy implemented for c++ training purposes