move data loader out of draw_graphic