sumSquare function

Helper function for sum of x*x