You have to pass the string variable to the methods, whatever the name of the variable is - the error is there because it is more than likely that s is not defined in the context of your code....