added score calculation

made minor change in s1,s2, nothing important, feel free to overwrite