fix bug: import debug module in plot
fix bug: discontfunc wasn't working