Modelling of feedback and rotation stabilization of the resistive wall mode in tokamaks