code_detector structure completed. need more algorithm.