adding magnetic field, improving submission script