string refactor