finished implementing clustering
merge conflict fixed