change some code in "checkForEvent", and add method "initStartTime"