refactoring out magic fields