more flexible id handling