Added derivative functions.