minor tweaks to timing code