added sum_squre diffence