[API,TEST] old clustering code restored