Added random noise and history plotting