gist stuff, not yet smoke-tested