* removed unneeded check on rules
* added possibility to specify masks