have pretty awesome matrices of shared gradients, need to work on connected component algo