added debug plot