change code to measure seconds consume