delete foo function