add support for fields in mapping and refactoring