general cases for S2
general cases for S1