detection collision version 2