Use identifiers when manipulating weights instead of anonymous tuples