added some more rules for delta function (should be complete now (?))