added addRestriction and addPreference methods