add timer for recording the perplexity