fix stuff and part of correspondance grouping implemented