updated fieldname mapping function