removed old grouping and toJSON