added smooth decoupled peak detector