add side effect detection in eliminate_ids