change analyse and tresholdind to have a correct weights balancing