Resistive MHD ballooning mode in tokamaks