added variables for time-based calculations