suffix tree for the win!