Added some calculation functions and timers