mostly done, still final test to go...