added control for turning clustering on/off