main method in S2F