Text this: Implicit second and third orders runge-kutta for handling discontinuities in delay differential equations