Developed the field resolver as a separate function