Added timing functionality