take the abs for sum of diff