refact string