Update clustering codes