In our paper we describe our new particle tracking code and we present results of our simulations of trajectories of runaway electrons in a time dependent magnetic eld computed by non-linear 3D MHD code JOREK for the case of pellet injection on Tore Supra tokamak. We show that the character of the resulting motion is not a simple diusion process but rather a sum of a stable motion on the same radius and phases of rapid changes of radial position.