added smoothing and playing with plotting