This isn't the most performant thing on earth, patterndb is much faster, and once you wrap your head around it, probably easier to follow aswell. But this was quicker to write :P Hope this helps! -- |8]