added more metrics to track...and avoided unnecessary computation of wavelet transform