factored out some testing functions to use elsewhere
eliminate dup on StringReader
working...