add team sorting and fix punish test