added some smoothing to pitch estimation