$string is a bad variable name, renamed it to input