Implement unique id generator