added some simple timing code