sim-ideal modified by Ziqi