I would go with MCA's idea, much faster

That bit of code that i made was really nothing more than a proof of concept.