remove visitor fn from graph