added code for timing purposes