clustering capsules