generalize subject_subst