now a nearly fully constrained version