added S2N calculation