debugging a type error in delete function test case