add the cosetRepresentatives() function