Added input cleaning udf