delete and rename function  works