adding timer and unit tests