add output result and time counting