refactored data keys to variables