try {
Address server1 = (Address) Network.getAddress(Benchmark.getServerId(j+"-"+i));
account = (IBankAccount)LocateRegistry.getRegistry(server1.inetAddress.getHostAddress(), server1.port).lookup(j+"-"+i);
account.rLock();
balance+=account.checkBalance();
account.rUnlock();
} catch (RemoteException e) {
e.printStackTrace();
} catch (NotBoundException e) {
e.printStackTrace();
} catch (InterruptedException e) {