added fieldfactory that makes fields