adding sample and hold and smooth sample and hold