modify related_weight generator