flexible id generator