add n-ary map and union-find for equivalent class checkin