how to retrieve the data and pass it to other parts of the application