using decorator to do timing of a function