refactored code so that it can use the service provider to pull data into the second activity