rule stack keeps track of currently executed rules