collision detection for nodes