Yeah, I copied it from you :p.

A bit hackily used here, however. The new solution is cleaner, and parallel (yay faster!).