complete crash logic