automatic id numbering for objects