added onset detection