remove redundant ids