added run and packet trasnfer functions to sim.