Title: MHD equilibrium and stability of a z-pinch in an external magnetic field