The JMA 3 step routine