refactored property clone function