done - bit of a hack, needs cleanup and some refactoring to become a useful dev->test->production tool, but shows some promise