add check for eventType