add untested string code and refactor, untestedly