clean input data