The local variable `source_text` passed into the method is never used, since you're scanning the global variable `$source_text`.