Add disclaimer: this is old, awful code.