Now supports all possible rules