Add function weight.