Refractoring sumsquare.cs