Adding absolute difference method