reformat the value and the weight tags