added delete and duplicate function