initialization with cm and lower grid points+plotting code