lists all maximal repeats, but corrupts memory