Great solution proposed Might not contain code at all but some reference to an online article found at KDnuggets.