refactored data loading to fragments