Ops, this doesn't seem to work: https://gist.github.com/9d6fa24f7a44ad34c955