change the way to detect insert point