analyzing and sorting through event types and returing cvs