added support for clustering