add duplication functionality