Implements #58
Completely untested, 37% random. May work by accident.