@Override
	public void run() {
		int to = rg.nextInt(bank.size());
		int amount = rg.nextInt(maxtransfer);

		CondLockDemo.theLock.lock();
		while (true) {
			try {
				if(bank.getSpecificAccount(from) < amount)
					CondLockDemo.cond.await();
				else 
					bank.transfer(from, to, amount, delay);
				CondLockDemo.cond.signalAll();
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			finally {
				CondLockDemo.theLock.unlock();
			}
		}

	}