Added timing logic