working on smoothing data