resolve the getfields function