add rule machine