added rules
added confdir global variable