Refactored code for all fields