mod derivative