-add check to enforce group ordering on input