data string cleaning before conversion