added live-plot and various improvements