1. change output fashion
2. seems to finish the WITHIN_N algorithm