much progress, see TODO.md