added missing $input paramter