added rule parser fun