duplication function implemented