public void onReceive(Object o) throws Exception {
if (o instanceof Coordinated) {
Coordinated coordinated = (Coordinated) o;
final Object message = coordinated.getMessage();
if (message instanceof AccountDebit) {
coordinated.atomic(new Runnable() {
public void run() {
AccountDebit accDebit = (AccountDebit) message;
//check for funds availability
if (balance.get() > accDebit.getAmount()) {
float bal = balance.get() - accDebit.getAmount();