collision avoidance algorithm + eventHandler extends