added most rules, modified some nodes