working on more efficient adaptive clustering algorithm. mostly there.