upgrade to use exceptions rather than return codes
shell for tests