refactor clean string into separate function