adding plotting in cma