added derivative option to graphs