added live plotting