refactored reg clone