fixes build
add definition
write ConvertXEvent function