Added computation of derivatives