Added a groupOutput function to OutputCollecter to return the HashMap