simple implementation of an atm machine