public Transaction transactionWLockOnVar(int index) {
		for (Transaction t: locks.keySet()) {
			ArrayList<Lock> lockListT = locks.get(t);
			for (Lock lock: lockListT) {
				if(lock.getIndex()==index && lock.isWrite()) {
					return t;
				}
			}			
		}
		return null;
	}