Text this: An efficient computational approach for numerical solution of non-smooth dynamical systems