add unit test for clustering