added configurable global weight