add the selectedTime variable