implemented the derivatives hook