Added code to check for cases for allowed times.