add rule extraction