more changes to s2f code