change constraints target to class