Ziqi added timer in main function