Implement XID generation method