[code] worked on merge duplicate teams and algorithm