Development of a particle in cell code for the simulation of dual stage ion thrusters