add clustering (ticket #2)