simplify to use more scope string manipulation