changed checkTime to regex