Modified the inversion routine to work for arrival times