fixing up derivatives