added time calculations