infer an id for items