collison detection added