add copy constructor to array