detecting collision starts and ends