created a case check function in eventNode