text is a local variable.  As this is in an else if block, any changes in the if block haven't done anything.