merged Version 0.7 for clustering