add the plotting code for Chen Cai