changed the boundary for self.collision
add collisionBehavior function