Change inputs function