timing and plotting