deriv method should be, not should return, None
added more docs about deriv method