change method name to group_by_odd_even

break method into two parts