fix bugs, write test
fix clusters