Vector potential calculation added