added most of cluster extraction