change logic for time execution calcultaion