correct way to get object id