update input_with_default fuction.