applying clean_inputs