you should also prevent ``$`` as previous char, as ``$function`` is a valid variable name