working on optimizer rules