Added support for clustering by attribute
Merging