First implementation of rule table