tweaking the data loader and abstracting the api classes