Update of summarizeSGP to accomodate higher level groupings