Create readEvent function.