517 homework works, but need to improve the suffix tree.