Added named rule support

fix issue #3