rewriting and tuning.  should probably use parseargs here ...
automated tests and testing - still quite a lot to be done