added most constrained var selection. constraint 2 is broken.