customize native object instantiation