done all algorithm. crashing