near-complete implementation with tests, no documentation yet and untested setup.py