Code now computes group xs for HW4 correctly. All set!