add unittest, and working on suffix search
add test.py for unittest
fix suffix to avoid generating repeat results

but it introduces extra searching costs.... should be another way to
fix. Perhaps update the suffix search algorithm