why this method and why its dependence on $input?