In reply to Louis Reingold.

The author of the original post that Matt responded to did most of the work.