added new grouping function, and improved zips