Updated code used for dipole  and liv runs for o2 runs