simplify copyObject()