Made adjustments to the delta function and it now seems to function
better. Need to do some more experiments