private Object execMethod(Object target, Method targetMethod, 
	Object[] args) {		
	
		boolean found = false;
		
		Method[] all = target.getClass().getMethods();
		Method foundMethod = null;
		
		for (Method m : all)
		
			//checks the name and the return type of the two methods
			if(m.getName().equals(targetMethod.getName()) && 
			   m.getReturnType().equals(targetMethod.getReturnType())) {
				
				found = true;
				
				//checks the parameters (overloading)
				Class[] mP = m.getParameterTypes();
				Class[] tP = targetMethod.getParameterTypes();
				
				if (mP.length == tP.length) {
					//every parameter type
					for (int i = 0; i < mP.length; i++) 
						if (!mP[i].equals(tP[i])) found = false;
				
				} else found = false;
				if (found) { foundMethod = m; break; }
			}
			
		if (!found) 
			throw new ModelRuntimeException("Method " + targetMethod.getName() 
			+ " not found in target " + target.getClass());
			
		Object callResult = null;
		
		try { callResult = foundMethod.invoke(target, args);
		
		} catch (Exception e) { 
			e.printStackTrace();
		}
		
		return callResult;
	}