clean up and update with cm tree