added support for multiple distributionr restrictions. reworked setting.py