State diagram for atm system