changed loc of collision functions