Add type weight_t