addting the running time of main function