rule adder
many small fixes