added two-sided constraints