modified wrap_constraints