refactor fields into partial and fix test