trying to fix duplicated and correspondence of ids