added a data service to retain the data when switching routes