finished the time analysis