I think the solution is, remove $input
As it’s mentioned by @marpet as explained in the following post,
Source of the post