make sure assigned id is unique