implement a better way to express extended rules