another few changes to the derivatives. Still not finished