public static boolean transfer(String accountNum1, String accountNum2, int amount, Context context, Timespec deadline, Timespec period_ts, int tid) throws InterruptedException{
boolean result = false;
try{
DirectoryManager locator = HyFlow.getLocator();
BankAccount account1 = (BankAccount) locator.open(accountNum1, "w", deadline, period_ts, tid);
ContextDelegator.beforeReadAccess(account1, 0, context);
BankAccount account2 = (BankAccount) locator.open(accountNum2, "w", deadline, period_ts, tid);
for(int i=0; i<Benchmark.calls; i++)
account1.withdraw(amount, context);
try {