refactor string variable