what is the grouping method in math