added a few comments and a timer to example.R