Cribbed from the original, I'll take a look.