adding derivative