delete funtion work well