better id handling