update codes with every new round