added the ability to undo group by