rewrote the propagator function for clarity