stopAnalog function added