refactor: extract field logic to another class