Revised the process to create reachable-matrix for acceleration. (halfway)