started separating concerns and creating a datasource class for the API call