Updating s2 function