change logic and fix a bug about 重合