add spent time, while denoising and fixed some bugs