Add getAllFields method