add timing functionality