fromScratchEd's derivative