selfimplemented summed Absolute Difference