refactor fields in class