refactored to allow overriding load_data function
changed to use new load_data functions