delete detection part