untested clustering
TODO: write some visualization and optimize