first revision of collision handler working