fix some bug & add plot