Added fields function to hash