public void setField(Object newValue) {
	
		//System.out.println("setting field " + fieldName + " to " + newValue);
		
		if (this.hasFunction) {
			// if it has a setter function, call that
			
			try {
				setterFunction.invoke(parent, new Object[] {newValue});
				
			// catch nasty exceptions
			} catch (IllegalArgumentException e) {
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			} catch (InvocationTargetException e) {
				e.printStackTrace();
			}
			
		} else {
			// no function, so just set the value
			try {
				// might need to type check this
				field.set(parent, newValue);
			} catch (IllegalArgumentException e) {
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}

		}
		//System.out.println("finished setting value");
	}