added sum of square problem