created return err to del func