first derivative working in 1 and 2 dimensions. added tests. differentiate passes tests