fix delete unneccessary function