improved clusterer; fixes #38