Added string function, variables and corrected syntax.