added smoothing function
wrote code for evtsplit