move data loader into own file