this works - though I have yet to make it efficient. Will implement a better algorithm that messes with indexes and one copy of the text instead of mulyiple copies>