add Time error class + add loop to iterate over the time array