add clone to support reg write callback