public void ChangeWords(int caretPosition, JTextPane txtContent) throws BadLocationException
	{
        if((System.currentTimeMillis() - lastTimeStamp) > timeUntilNextWordChange){
        	lastTimeStamp = System.currentTimeMillis();
        }	
		if(isCharALetter(txtContent, caretPosition)) {

        	if(!this.wordChanged)
        	{
        		wordChanged = changeWordXWordsInfront(swapWord, numWordsInfront, caretPosition, txtContent);
        		if (wordChanged){
        			DocumentReader.writeToTextFile(Settings.fileName, "WORD CHANGED: "+this.lastWordChanged+" , Time:" +System.currentTimeMillis());
        		}
        	}
	    	
	        //if we changed a word and the gaze has moved onto the next word
	        if(wordChanged && !getWord(caretPosition, txtContent).equalsIgnoreCase(this.currentWord))
	        {
	        	chooseWordToSwap(txtContent);
	        }
		} else if (wordChanged) { //if we have a non character (whitespace) but the word has been swapped swap it back!
        	chooseWordToSwap(txtContent);
		}
        
	}