implemented primitive clustering, fix syntax