moved deriv output into saveDeriv function, and disabled it
changed input variable from #define to string