Propagation of cosmic rays through space